﻿// -----------------------------------------------------------------------
// <copyright file="IPushStatsBatchUpdaterService.cs" company="Zen Design Corp">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace Zen.BlackBerry.Push.Stats
{
	/// <summary>
	/// Performs a batch update of push statistics to storage.
	/// </summary>
	public interface IPushStatsBatchUpdaterService
	{
		/// <summary>
		/// Returns the size of the queue holding push stats waiting to be
		/// batched and processed.
		/// </summary>
		/// <value>The size of the push stats queue.</value>
		int PushStatsQueueSize
		{
			get;
		}

		/// <summary>
		/// Adds a push stats object to the list of updates to be batched.
		/// </summary>
		/// <param name="pushStats">The push stats.</param>
		void AddPushStatsUpdate(PushStats pushStats);

		/// <summary>
		/// When a reset is called, find all push stats objects in the list of
		/// updates and set their contribution to the running content sum to 0.
		/// </summary>
		/// <param name="applicationId">The application id.</param>
		void ResetRunningContentSum(string applicationId);

		/// <summary>
		/// When a reset is called, find all push stats objects in the list of
		/// updates and set their contribution to the running push count to 0.
		/// </summary>
		/// <param name="applicationId">The application id.</param>
		void ResetRunningPushCount(string applicationId);

		/// <summary>
		/// Performs a batch update of several push stats objects to storage.
		/// </summary>
		void Run();
	}
}
